﻿@model Project_2._2.ViewModels.RoleViewModel

@{
    ViewBag.Title = "Tạo Mới Phân Quyền";
    Layout = "~/Views/Shared/_AdminLayoutPage.cshtml";
}

<script src="~/Script/Validate/jquery.validate.min.js"></script>
<script src="~/Script/Validate/jquery.validate.unobtrusive.min.js"></script>
<link href="~/Content/Validate%20Javascript/validationEngine.jquery.css" rel="stylesheet" />
<script src="~/Script/Validate%20Javascript/jquery-1.8.2.min.js"></script>
<script src="~/Script/Validate%20Javascript/jquery.validationEngine.js"></script>
<script src="~/Script/Validate%20Javascript/jquery.validationEngine-vi.js"></script>

<script>
    jQuery(document).ready(function () {
        // binds form submission and fields to the validation engine
        jQuery("#form").validationEngine();
    });

</script>

<link href="~/Content/Admin-content-right.css" rel="stylesheet" />
<div class="grid_12">
    <div class="block-border">
        <div class="block-header">
            Thêm Mới Phân Quyền
            @Html.ActionLink("Trở về Danh Sách", "Default", "AdminRole", null, new { @class = "button" })
        </div>
        <div class="block-content">


            @using (Html.BeginForm("Create", "AdminRole", FormMethod.Post, new { enctype = "multipart/form-data" , id="form" }))
            {
                @Html.ValidationSummary(true)
                @Html.AntiForgeryToken()

                <table style="padding: 20px 0 0 50px; line-height: 35px; color: #808080; font-weight: bold">
                    <tr>
                        <td style="padding-top:12px">@Html.LabelFor(m => m.RoleName)<span style="color:red"> * </span></td>
                        <td style="padding-top:12px">
                            @Html.TextBoxFor(m => m.RoleName, new { @class = "Textbox validate[required,maxSize[200]]", @style = "width:300px" })
                            @Html.ValidationMessageFor(m => m.RoleName)
                        </td>
                    </tr>

                    <tr>
                        <td style="padding-top:12px">@Html.LabelFor(m => m.MoTa)<span style="color:red"></span></td>
                        <td style="padding-top:12px">
                            @Html.TextAreaFor(m => m.MoTa, new { @class = "TextArea ", @style = "width:400px; height:96px" })
                            @Html.ValidationMessageFor(m => m.MoTa)
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-top:12px">@Html.LabelFor(m => m.captcha) <span style="color:red">  *  </span></td>
                        <td style="padding-top:12px">
                            @Html.TextBoxFor(m => m.captcha, new { @class = "Textbox validate[required]", @style = "width:80px" })
                            <img id="Img3" alt="Captcha image" src="../Captcha/Captcha" style=" margin-bottom:-10px; height:29px;border-radius:4px; " />
                            @Html.ValidationMessageFor(m => m.captcha)
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-top:12px ; padding-left:120px">
                            <input type="submit" value="Thêm Mới " class="MyButton" />
                            <input type="reset" value="Hủy Bỏ" class=" MyButton" />
                        </td>
                    </tr>
                </table><br />
            }

        </div>
    </div>
</div>

